<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>COMMONS-NET: commonsNet.tftp.TFTPReadRequestPacket类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">COMMONS-NET
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pac-methods">包函数</a> &#124;
<a href="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">commonsNet.tftp.TFTPReadRequestPacket类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>TFTPReadRequestPacket 是从 TFTPPacket 派生的类，定义了 TFTP 读取请求数据包类型。  
 <a href="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.html#details">更多...</a></p>
<div class="dynheader">
类 commonsNet.tftp.TFTPReadRequestPacket 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.png" usemap="#commonsNet.tftp.TFTPReadRequestPacket_map" alt=""/>
  <map id="commonsNet.tftp.TFTPReadRequestPacket_map" name="commonsNet.tftp.TFTPReadRequestPacket_map">
<area href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html" title="TFTPRequestPacket 是从 TFTPPacket 派生的类，定义了 TFTP 请求数据包类型。" alt="commonsNet.tftp.TFTPRequestPacket" shape="rect" coords="0,56,249,80"/>
<area href="classcommonsNet_1_1tftp_1_1TFTPPacket.html" title="TFTPPacket 是一个抽象类，封装了五种类型的 TFTP 数据包共有的功能。它还提供了一个静态工厂方法，用于根据数据报创建正确的 TFTP 数据包实例。" alt="commonsNet.tftp.TFTPPacket" shape="rect" coords="0,0,249,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:af62bc2a5aea597ab2feffacf7d63588e"><td class="memItemLeft" align="right" valign="top">public override func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.html#af62bc2a5aea597ab2feffacf7d63588e">toString</a> (): String</td></tr>
<tr class="memdesc:af62bc2a5aea597ab2feffacf7d63588e"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于调试，返回对象的字符串表示，包括类型、请求文件名、 TFTP 传输模式。  <br /></td></tr>
<tr class="separator:af62bc2a5aea597ab2feffacf7d63588e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html">commonsNet.tftp.TFTPRequestPacket</a></td></tr>
<tr class="memitem:a7448bf79b94f0f5ef845b357f6cd727c inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html#a7448bf79b94f0f5ef845b357f6cd727c">getFilename</a> (): String</td></tr>
<tr class="memdesc:a7448bf79b94f0f5ef845b357f6cd727c inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回请求的文件名。  <br /></td></tr>
<tr class="separator:a7448bf79b94f0f5ef845b357f6cd727c inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32b30ed576717fe2a4eb285114dfa3bb inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html#a32b30ed576717fe2a4eb285114dfa3bb">getMode</a> (): Int64</td></tr>
<tr class="memdesc:a32b30ed576717fe2a4eb285114dfa3bb inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回请求的传输模式。  <br /></td></tr>
<tr class="separator:a32b30ed576717fe2a4eb285114dfa3bb inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a880247266e86361eaa1ff76334ea073a inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memItemLeft" align="right" valign="top">public override func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html#a880247266e86361eaa1ff76334ea073a">newData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:a880247266e86361eaa1ff76334ea073a inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个UDP数据报，其中包含所有TFTP请求数据包数据的正确格式。  <br /></td></tr>
<tr class="separator:a880247266e86361eaa1ff76334ea073a inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a449be75d783028d271f3e1af62f970a9">newTFTPPacket</a> (datagram: Array&lt;Byte&gt;, address: String, port: UInt16): <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">TFTPPacket</a></td></tr>
<tr class="memdesc:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">当接收到一个预期为 TFTP 数据包的数据报时，使用此工厂方法创建正确的 TFTPPacket 对象，封装在该数据报中的数据。  <br /></td></tr>
<tr class="separator:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#af865694cdd78af54d3d0775a887cf5ed">getAddress</a> (): String</td></tr>
<tr class="memdesc:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据包的来源或将要发送的目标主机地址。  <br /></td></tr>
<tr class="separator:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a27e7a619dfec5ab08d65079a57c58657">getPort</a> (): UInt16</td></tr>
<tr class="memdesc:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据包的来源或将要发送的目标端口。  <br /></td></tr>
<tr class="separator:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a0ac725cc37ddee6a29e93c6d16205f73">getPacketType</a> (): Int64</td></tr>
<tr class="memdesc:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回数据包的类型。  <br /></td></tr>
<tr class="separator:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a5e78b2bfd31eec2d9b33ead235374370">newData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个正确格式的 TFTP 数据包数据。  <br /></td></tr>
<tr class="separator:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a027e8d3541a9ff74cf75639a1251d092">setAddress</a> (address: String): Unit</td></tr>
<tr class="memdesc:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据包要发送到的主机地址。  <br /></td></tr>
<tr class="separator:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ab907b12cf65da8783e9dfb81ea18e5c4">setPort</a> (port: UInt16): Unit</td></tr>
<tr class="memdesc:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据包要发送的端口。  <br /></td></tr>
<tr class="separator:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public open func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a4aad5bc8e980f2256d2bbe3baa9d746b">toString</a> (): String</td></tr>
<tr class="memdesc:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于调试，返回对象的字符串表示，包括地址、端口、类型。  <br /></td></tr>
<tr class="separator:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pac-methods" name="pac-methods"></a>
包函数</h2></td></tr>
<tr class="memitem:a3ff1f5ad049d09ba7e2c9ef0fb8ad255"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.html#a3ff1f5ad049d09ba7e2c9ef0fb8ad255">init</a> (data: Array&lt;Byte&gt;, datagram: IPSocketAddress)</td></tr>
<tr class="memdesc:a3ff1f5ad049d09ba7e2c9ef0fb8ad255"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据接收到的数据报创建一个读取请求数据包，假定数据报已经被标识为读取请求。假定数据报至少长度为4，否则可能会抛出 IndexOutOfBoundsException 。  <br /></td></tr>
<tr class="separator:a3ff1f5ad049d09ba7e2c9ef0fb8ad255"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16e8a8665a11182e6dbd9dd3f491e15a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.html#a16e8a8665a11182e6dbd9dd3f491e15a">init</a> (destination: String, port: UInt16, fileName: String, mode: Int64)</td></tr>
<tr class="memdesc:a16e8a8665a11182e6dbd9dd3f491e15a"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个读取请求数据包，将其发送到指定端口的主机，并带有文件名和传输模式请求。  <br /></td></tr>
<tr class="separator:a16e8a8665a11182e6dbd9dd3f491e15a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td colspan="2" onclick="javascript:toggleInherit('pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket')"><img src="closed.png" alt="-"/>&#160;包函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html">commonsNet.tftp.TFTPRequestPacket</a></td></tr>
<tr class="memitem:a768828f5df1cb2da08facb0c80f7972e inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html#a768828f5df1cb2da08facb0c80f7972e">init</a> (destination: String, port: UInt16, packettype: Int64, fileName: String, mode: Int64)</td></tr>
<tr class="memdesc:a768828f5df1cb2da08facb0c80f7972e inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个指定类型的请求数据包，用于通过TFTP（Trivial File Transfer Protocol）发送到指定主机和端口， 可以指定请求的文件名和传输模式。  <br /></td></tr>
<tr class="separator:a768828f5df1cb2da08facb0c80f7972e inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e291ef94c4c3e18a6dd9faada2201fd inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPRequestPacket.html#a7e291ef94c4c3e18a6dd9faada2201fd">init</a> (packettype: Int64, data: Array&lt;Byte&gt;, datagram: IPSocketAddress)</td></tr>
<tr class="memdesc:a7e291ef94c4c3e18a6dd9faada2201fd inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据接收到的数据报创建一个给定类型的请求数据包。假定数据报至少长度为4，否则可能会抛出 IndexOutOfBoundsException 。  <br /></td></tr>
<tr class="separator:a7e291ef94c4c3e18a6dd9faada2201fd inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPRequestPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;包函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ad3f5a4b401a490faa07781b1565a6b74">init</a> (packettype: Int64, address: String, port: UInt16)</td></tr>
<tr class="memdesc:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个 TFTPPacket 对象。  <br /></td></tr>
<tr class="separator:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;Public 属性 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a1b9d01dc44fc4d498b613e4c8f0b606d">static let READ_REQUEST</a> = 1;</td></tr>
<tr class="memdesc:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于1。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示读请求数据包。  <br /></td></tr>
<tr class="separator:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ae400dc7ae167e2886890feefe6b9385e">static let WRITE_REQUEST</a> = 2;</td></tr>
<tr class="memdesc:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于2。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示写请求数据包。  <br /></td></tr>
<tr class="separator:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a8f98d56c20097453a986157c881bf5ea">static let DATA</a> = 3;</td></tr>
<tr class="memdesc:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于3。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示数据数据包。  <br /></td></tr>
<tr class="separator:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#aef344f92fab5c92ba4cc7794804bbbc0">static let ACKNOWLEDGEMENT</a> = 4;</td></tr>
<tr class="memdesc:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于4。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示确认数据包。  <br /></td></tr>
<tr class="separator:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#aa636305b5ea4afa869b03bdad53fa2e9">static let ERROR</a> = 5;</td></tr>
<tr class="memdesc:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于5。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示错误数据包。  <br /></td></tr>
<tr class="separator:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ae23de23646555553bcebb5a748af38c5">static let SEGMENT_SIZE</a> = 512;</td></tr>
<tr class="memdesc:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 数据包的最大段大小，为 512 字节。  <br /></td></tr>
<tr class="separator:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>TFTPReadRequestPacket 是从 TFTPPacket 派生的类，定义了 TFTP 读取请求数据包类型。 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a3ff1f5ad049d09ba7e2c9ef0fb8ad255" name="a3ff1f5ad049d09ba7e2c9ef0fb8ad255"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ff1f5ad049d09ba7e2c9ef0fb8ad255">&#9670;&#160;</a></span>init() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPReadRequestPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>data</em>:&#160;</td>
          <td class="paramtype">Array&lt;Byte&gt;, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>datagram</em>:&#160;</td>
          <td class="paramtype">IPSocketAddress&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>根据接收到的数据报创建一个读取请求数据包，假定数据报已经被标识为读取请求。假定数据报至少长度为4，否则可能会抛出 IndexOutOfBoundsException 。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">datagram</td><td>包含接收到的请求的数据报。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">TFTPPacketException</td><td>如果数据报不是有效的TFTP请求数据包。 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a16e8a8665a11182e6dbd9dd3f491e15a" name="a16e8a8665a11182e6dbd9dd3f491e15a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16e8a8665a11182e6dbd9dd3f491e15a">&#9670;&#160;</a></span>init() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPReadRequestPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>destination</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>port</em>:&#160;</td>
          <td class="paramtype">UInt16, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>fileName</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>mode</em>:&#160;</td>
          <td class="paramtype">Int64&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>创建一个读取请求数据包，将其发送到指定端口的主机，并带有文件名和传输模式请求。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">destination</td><td>要发送数据包的主机。 </td></tr>
    <tr><td class="paramname">port</td><td>要发送数据包的端口。 </td></tr>
    <tr><td class="paramname">fileName</td><td>请求的文件名。 </td></tr>
    <tr><td class="paramname">mode</td><td>请求的传输模式。这应该是TFTP类的MODE常量之一（例如，TFTP.NETASCII_MODE）。 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="af62bc2a5aea597ab2feffacf7d63588e" name="af62bc2a5aea597ab2feffacf7d63588e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af62bc2a5aea597ab2feffacf7d63588e">&#9670;&#160;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public override func commonsNet.tftp.TFTPReadRequestPacket.toString </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: String </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>用于调试，返回对象的字符串表示，包括类型、请求文件名、 TFTP 传输模式。 </p>
<dl class="section return"><dt>返回</dt><dd>返回表示对象的字符串 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/tftp/<a class="el" href="tftp__readrequest__packet_8cj.html">tftp_readrequest_packet.cj</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecommonsNet.html">commonsNet</a></li><li class="navelem"><a class="el" href="namespacecommonsNet_1_1tftp.html">tftp</a></li><li class="navelem"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPReadRequestPacket.html">TFTPReadRequestPacket</a></li>
    <li class="footer">制作者 <img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
